import request from 'utils/request'
import api from '@/api'
import { GET_HOT_MOVIES } from './actionType'

const homeAction = {
    getHotMovies() {
        return async dispatch => {
            const res =  await request({
                url:api.HOT_MOVIES,
                method:'GET',
                params:{
                    token:''
                }
            })
            dispatch({
                type:GET_HOT_MOVIES,
                payload: res.data
            })
        }
    }
}

export default homeAction